#include <stdio.h>
#include <math.h>

int main()
{
    int s, v;
    scanf("%d%d", &s, &v);
    double t = (double)s / v;
    t = floor(t + 1.0) + 10.0;
    int mp = t;
    int hp = 0;
    while (mp >= 60)
    {
        hp++;
        mp -= 60;
    }
    int hh = 8 - hp, mm = -mp;
    while (mm < 0)
    {
        mm += 60;
        hh--;
    }
    while (hh < 0)
    {
        hh += 24;
    }
    printf("%02d:%02d", hh, mm);
    return 0;
}